<?php
	class Restaurants extends CI_Controller{
		public function __construct(){
			parent::__construct();
			$this->load->helper("url");
			$this->load->model("model_restaurant");
		}
		public function index(){
			$id = $this->uri->segment(3);
			$data['restaurant'] = $this->model_restaurant->getdata($id);
			if($data['restaurant'] == NULL){ redirect(base_url());}
			$data['title'] = $data['restaurant']['restaurant_title'];
			$this->load->view("restaurants/layout",$data);
		}
	}